Draft
Conversation
Replace string literals with a registered GraphQL enum for product validation error codes in both API and admin.
johnnyomair
reviewed
Mar 17, 2026
Comment on lines
+67
to
+73
| <Box sx={{ display: "flex", alignItems: "center", justifyContent: "center", width: "100%", height: "100%", py: 0.5 }}> | ||
| <img | ||
| src={damFile.fileUrl} | ||
| alt="" | ||
| style={{ maxHeight: "100%", maxWidth: "100%", objectFit: "contain", borderRadius: 4 }} | ||
| /> | ||
| </Box> |
Collaborator
There was a problem hiding this comment.
This should use BlockPreviewContent, like here: https://github.com/vivid-planet/comet/blob/4c6b9c8c62bd5ccca1703e62f80ab17788a40dab/demo/admin/src/news/generated/NewsGrid.tsx#L127-L129.
Comment on lines
+78
to
+84
| @Property({ type: "text" }) | ||
| @Field() | ||
| domain: string; | ||
|
|
||
| @Property({ type: "text" }) | ||
| @Field() | ||
| language: string; |
Collaborator
There was a problem hiding this comment.
Normally we use an embeddable scope for this.
Comment on lines
+73
to
+76
| @RootBlock(DamImageBlock) | ||
| @Property({ type: new RootBlockType(DamImageBlock), nullable: true }) | ||
| @Field(() => RootBlockDataScalar(DamImageBlock), { nullable: true }) | ||
| mainImage?: BlockDataInterface; |
Collaborator
There was a problem hiding this comment.
Not every factory in Comet supports nullable blocks. Should blocks always be required? This would be okay because we'll always have a default value.
|
|
||
| @Module({ | ||
| imports: [MikroOrmModule.forFeature([Product])], | ||
| providers: [ProductsService, ProductResolver], |
Collaborator
There was a problem hiding this comment.
Now is the time to fix this singular/plural issue. 😁
Collaborator
There was a problem hiding this comment.
Having the spec in the repo is awesome. 👌🏼
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sample PR showcasing how Claude (Opus 4.6) implements full-stack CRUD from a spec file using Comet skills. The entire implementation — API, admin UI, enums, validations — was generated from
specs/product/01-product.md.What's implemented
ProductValidationErrorCodeenum/productsSpec
See
specs/product/01-product.mdfor the full requirements.